#define _CRT_SECURE_NO_WARNINGS

#include "Heap.h"

TestHeap()
{
	//HP hp;
	//HPInit(&hp);

	HP hp;
	HPInit(&hp);
	HPtype a[] = { 123,2,13,12,42,422,12,4211,2,1142,12123,3222,211,1123,132,122,666,333,222,6564,3131,22424,2332,121313,4343,1,2121,324242,121212,24242,1212,3232,12121,4343,112121,34434,12121,433,12121,34343,121 };
	int sz = sizeof(a) / sizeof(a[0]);
	int k = 0;
	scanf("%d", &k);
	PrintTopK(&hp, a, sz, k);

	//for (int i = 0; i < sz; i++)
	//{
	//	printf("%d ", a[i]);
	//}

	//HPPush(&hp, 19);
	//HPPush(&hp, 13);
	//HPPush(&hp, 22);
	//HPPush(&hp, 56);
	//HPPush(&hp, 14);
	//HPPush(&hp, 24);
	//HPPush(&hp, 36);
	//HPPush(&hp, 35);
	//HPPush(&hp, 24);
	//HPPush(&hp, 23);
	//HPPush(&hp, 34);
	//HPPrint(&hp);

	//HPPop(&hp);
	//HPPop(&hp);
	//HPPop(&hp);
	//HPPop(&hp);
	//HPPop(&hp);
	//HPPop(&hp);
	//HPPrint(&hp);
}

int main()
{
	TestHeap();

	return 0;
}